{extend name="base" /} {block name="body"}
<div class="layui-body">
	<!--tab标签-->
	<div class="layui-tab layui-tab-brief">
		<ul class="layui-tab-title">
			<li class="layui-this">首页图片</li>
			<li class="">
				<a href="{:url('ad/add')}">添加图片</a>
			</li>
		</ul>
		<div class="layui-tab-content">
			<form action="" method="post" class="ajax-form">
				<div class="layui-tab-item layui-show">
					<table class="layui-table">
						<thead>
							<tr>
								<th style="width: 15px;"><input type="checkbox" class="check-all"></th>
								<th>缩略图</th>
								<th>标题</th>
								<th>地址</th>
								<th>状态</th>
								<th>发布时间</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							{foreach name="article_list" item="vo"}
							<tr>
								<td><input type="checkbox" name="ids[]" value="{$vo.id}"></td>
								<td><img src="{$vo.thumb}" style="height: 100px;width: 300px;"/></td>
								<td>{$vo.title}</td>
								<td>{$vo.url}</td>
								<td>{php}echo $vo['status']==1 ? '显示' : '隐藏';{/php}</td>
								<td>{$vo.add_time}</td>
								<td>
									<a href="{:url('ad/edit',['id'=>$vo['id']])}" class="layui-btn layui-btn-normal layui-btn-small">编辑</a>
									<a href="{:url('ad/delete',['id'=>$vo['id']])}" class="layui-btn layui-btn-danger layui-btn-small ajax-delete">删除</a>
								</td>
							</tr>
							{/foreach}
						</tbody>
					</table>
				</div>
			</form>
		</div>
	</div>
</div>
{/block}